<div class="content">
	<div class="tab_bar">
		<ul>
			<li class="tab_index" onclick="setTabContent(this);"><h3>编辑用户</h3></li>
		</ul>
		<button class="btn_tabbar" onclick="submitActionForm(this);" return="user/list.do?currentPageNo=1">保 存</button>
	</div>
	<form id="myForm" action="user/update.do" method="post">
	<div class="tab_content">
		<div class="tab_item tab_show"> 
			<input type="hidden" name="id" value="${user.id?c}" /> 
			<table class="table_for_add">
				<tbody>
					<th width="140">用户分组：</th>
						<td>
						<select class="select_for_add" name="gid" id="groupid">
						    <#list groups as g>
					 	 	<option value="${g.id?c}">${g.name!} (${g.description!})</option>
					 	 	</#list>
						</select>
						
						
						</td>
						<td><span id="name_status"></span></td>
					</tr>
					<tr class="rowBgColor">
						<th width="140">用户昵称：</th>
						<td><input class="input_for_add" name="nickname" type="text" value="${user.nickname!}" /></td>
						<td width="30"><span id="name_status"></span></td>
					</tr>
					<tr>
						<th>登录名称： </th>
						<td><input class="input_for_add" name="name" type="text" value="${user.name!}" /></td>
						<td><span id="scope_status"></span></td>
					</tr>
					<tr class="rowBgColor">
						<th>用户密码：</th>
						<td><input class="input_for_add" name="pass" type="password" value="${user.pass!}" onfocus="$(this).val('');" /></td>
						<td><span id="type_status"></span></td>
					</tr> 
					<tr>
						<th>描述信息：</th>
						<td>
							<textarea class="textarea_for_add" name="description">${user.description!}</textarea>
						</td>
						<td><span id="address_status"></span></td>
					</tr>
			 		<tr class="rowBgColor">
						<th>用户状态：</th>
						<td>
							<#if user.id = 1>
								内置 <input type="hidden" name="status" value="${user.status?c}" /> 
							<#else>
								<select class="select_for_add" name="status">
								<#if user.status == 1>
								<option value="1" selected="selected">启用</option>
								<option value="0">禁用</option>
								<#else>
								<option value="1">启用</option>
								<option value="0" selected="selected">禁用</option>
								</#if>
								</select>
							</#if>
						</td>
						<td><span id="address_status"></span></td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
	</form>
</div>
<script type="text/javascript"> 
//设置用户分组ID
var gid = '${user.gid?c}';
$("#groupid").attr('value', gid);
</script>